#include "sirCaractere.h"
int main(){
    sirCaractere c,d,e;
    cin>>c;
    cin>>d;
    e=c+d;
    if (c==d)
        cout<<"egalitate"<<endl;
    if (e>c)
        cout<<"mai mare"<<endl;
    cout<<e<<endl;
    cout<<e.size();
}